package request

type CreateMenuRequest struct {
	Title         string `json:"title" binding:"required"`
	Path          string `json:"path"`
	ComponentPath string `json:"component_path"`
	Icon          string `json:"icon"`
	ParentID      *uint  `json:"parent_id"`
	Sort          int    `json:"sort"`
	Status        int    `json:"status"`
}

type UpdateMenuRequest struct {
	Title         string `json:"title" binding:"required"`
	Path          string `json:"path"`
	ComponentPath string `json:"component_path"`
	Icon          string `json:"icon"`
	ParentID      *uint  `json:"parent_id"`
	Sort          int    `json:"sort"`
	Status        int    `json:"status"`
}

type MenuListRequest struct {
	PageRequest
}

// AddMenuPermissionsRequest 添加菜单权限请求
type AddMenuPermissionsRequest struct {
	Permissions []PermissionRequest `json:"permissions" binding:"required"`
}

// PermissionRequest 权限请求
type PermissionRequest struct {
	Code        string `json:"code" binding:"required"`
	Description string `json:"description" binding:"required"`
	RoleIDs     []uint `json:"role_ids" binding:"required"`
}
